package com.tiger.cloud.enums;

import com.tiger.cloud.common.mybatis.handler.CodeEnum;

/**
 * 通用枚举类型
 */
public enum UserCompanyInfoIAreaType implements CodeEnum<UserCompanyInfoIAreaType> {

	monomer_corporation(0, "单体公司"), city_character(1, "城市性"), region_character(2, "区域性"), nationwide(3, "全国性");

	private int code;
	private String desc;

	private UserCompanyInfoIAreaType(int code, String desc) {
		this.code = code;
	}

	/**
	 * 通过枚举<code>name</code>获取枚举
	 */
	public static UserCompanyInfoIAreaType getEnumByCode(Integer code) {
		if (code == null) {
			return null;
		}
		for (UserCompanyInfoIAreaType enumm : UserCompanyInfoIAreaType.values()) {
			if (enumm.getCode() == code.intValue()) {
				return enumm;
			}
		}
		return null;
	}

	@Override
	public int getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

}
